<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions" >
<h:head>
	<title>Personal Home</title>
</h:head>
<h:body>
	<h:form>
 		<h:panelGrid columns="1">
	  		<p:outputLabel value="Employee: #{personalHomeEmployee.currentUserEmail}" />
	 
	  		<p:outputLabel value="Name: #{personalHomeEmployee.currentUserName}" />
	  		
	 		<p:outputLabel value="Surname: #{personalHomeEmployee.currentUserSurname}" />
	 		
	 		<p:commandButton action="#{logoutBean.logout()}" value="Logout" />
		</h:panelGrid>
	</h:form>
	<br/>
	<h:form>
		<p:outputLabel value="Show base products" />
		<h:panelGrid columns="2">	
			<p:outputLabel value="Overpast " />
			<p:selectBooleanButton value="#{personalHomeEmployee.baseProductOverpast}"
				onLabel="Yes" offLabel="No" onIcon="ui-icon-check" offIcon="ui-icon-close" />
      		<p:commandButton value="Submit"  action="#{personalHomeEmployee.navigateToBaseProducts()}" />
		</h:panelGrid>
	</h:form>
	<br/>
	<h:form>
		<p:outputLabel value="Show travel packages" />
		<h:panelGrid columns="2">
			<p:outputLabel value="Overpast " />
			<p:selectBooleanButton value="#{personalHomeEmployee.travelPackageOverpast}"
				onLabel="Yes" offLabel="No" onIcon="ui-icon-check" offIcon="ui-icon-close" />
      		<p:commandButton value="Submit" action="#{personalHomeEmployee.navigateToPackages()}" />
		</h:panelGrid>
	</h:form>
	<br />
	<h:form>
		<p:messages id="msgs" autoUpdate="true"/>
		<p:outputLabel value="Search participations" />
		<h:panelGrid columns="3">
			<p:outputLabel for="idPackage" value="Package ID: " />
			<p:inputText id="idPackage" value="#{personalHomeEmployee.idPackage}" label="Package ID"
					converterMessage="Please insert a valid ID number.">
					<f:convertNumber integerOnly="true" type="number"/>
			</p:inputText>
			<p:message for="idPackage" display="icon"/>
		
      		<p:commandButton value="Submit" action="#{personalHomeEmployee.navigateToParticipations()}" />
      	</h:panelGrid>
	</h:form>
	<br/>
    <h:link value="Add package" outcome="addPackage" />
</h:body>
</html>